
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label">货车类型：</label>
        <div class="layui-input-block">
            <input type="text" name="type" lay-verify="required" lay-reqtext="货车类型" value="" class="layui-input field-type">
        </div>
    </div>
	<div class="layui-form-item">
            <label class="layui-form-label required">货车图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="truck_img" class="field-truck_img layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传货车图片" placeholder="货车图片" value="">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="truck_img" data-upload-number="one" data-upload-exts="png|jpg|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_banner_img" data-upload-select="truck_img" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">联系人：</label>
        <div class="layui-input-inline">
            <input type="text" name="contact" placeholder="联系人" value="" class="layui-input field-contact">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">联系手机：</label>
        <div class="layui-input-inline">
            <input type="text" name="phone" value="0" class="layui-input field-phone">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序：</label>
        <div class="layui-input-inline">
            <input type="number" name="sort" value="1" class="layui-input field-sort">
        </div>
        <div class="layui-form-mid layui-word-aux">1~99</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态：</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1"  title="启用" class="field-status" checked>
            <input type="radio" name="status" value="0"  title="禁用" class="field-status">
        </div>
    </div>
    <input type="hidden" class="field-id" name="id">
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
    </form>
</div>

<script>
    

    layui.use(['form','jquery', 'layer', 'func'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        layui.func.assign({:json_encode($data)});   // 解析数据
    });
</script>
</body>
</html>